package com.ld.tool.model.tool;

import java.util.List;

import lombok.Data;

/**
 * 按类型分组的在线工具
 * 
 * @author <a href="mailto:donggongai@126.com" target="_blank">吕凯</a>
 * @date 2019年12月11日 上午11:50:58
 *
 */
@Data
public class OnlineToolGroupTypeModel {
    private String type; // 类型
    private List<OnlineToolModel> models; // 在线工具类

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof OnlineToolGroupTypeModel))
            return false;
        OnlineToolGroupTypeModel other = (OnlineToolGroupTypeModel) o;
        if (!other.canEqual(this))
            return false;
        Object thisSource = getType();
        Object otherSource = other.getType();
        if (thisSource == null ? otherSource != null : !thisSource.equals(otherSource)) {
            return false;
        }
        return true;
    }

    protected boolean canEqual(Object other) {
        return other instanceof OnlineToolGroupTypeModel;
    }

    @Override
    public int hashCode() {
        int PRIME = 57;
        int result = 1;
        Object source = getType();
        result = result * PRIME + (source == null ? 44 : source.hashCode());
        return result * PRIME + 71;
    }

}
